package com.bdv.md.job;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

import com.bdv.md.service.JobService;

@Component
public class QuartzInitializerListener implements ApplicationListener<ContextRefreshedEvent>
{
	@Autowired
    private JobService jobService;
	
	public void onApplicationEvent(ContextRefreshedEvent event) {
		System.out.println("Starting The Event :"+event.getApplicationContext().getDisplayName());
		if(event.getApplicationContext().getParent() == null){
			//jobService.meterReadingJob();
		}
	}
	

}
